// 管理员
'use strict';
const { Controller } = require('egg');

class cAdmin extends Controller {
  async pc_c_login() {
    // 查询全部
    const { ctx } = this;
    const result = await ctx.service.sAdmin.pc_s_login(ctx?.request?.body ?? {});
    ctx.body = result;
  }

  // 查
  async pc_c_query() {
    const { ctx } = this;
    const result = await ctx.service.sAdmin.pc_s_query(ctx?.query ?? {});
    ctx.body = result;
  }
  // 增
  async pc_c_create() {
    console.log('?? - pc_c_create');
    const { ctx } = this;
    const result = await ctx.service.sAdmin.pc_s_create(ctx?.request?.body ?? {});
    ctx.body = result;
  }

  // 改
  async pc_c_update() {
    console.log('?? - pc_c_update');
    const { ctx } = this;
    const result = await ctx.service.sAdmin.pc_s_update(ctx?.request?.body ?? {});
    ctx.body = result;
  }

  // 删
  async pc_c_delete() {
    console.log('?? - pc_c_delete');
    const { ctx } = this;
    const result = await ctx.service.sAdmin.pc_s_delete(ctx?.query ?? {});
    ctx.body = result;
  }
  // // 测试
  // async pc_test() {
  //   const { ctx } = this;
  //   ctx.body = "6666";
  // }



  
}



module.exports = cAdmin;